package bancosys.tec.services.entities.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;
import bancosys.tec.component.Documentation;
import bancosys.tec.persist.bussobj.AuthPersistableBusinessObject;
import bancosys.tec.persist.persister.annotation.NaturalKey;

@Entity
@Table(name = "SERVICE_NATURAL_KEY")
@Alias("SNK")
@SequenceGenerator(name = "SEQ_SNK", sequenceName = "SEQ_SNK")
@Documentation("TABELA DE TESTES.")
public class ServiceNaturalKeyBean extends AuthPersistableBusinessObject {

    private Long id;

    private String nome;

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_SNK")
    @Documentation("TABELA DE TESTES.")
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @NaturalKey
    @Column(name = "NOME")
    @Documentation("TABELA DE TESTES.")
    public String getNome() {
        return this.nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

}
